﻿using System;
using System.ComponentModel.DataAnnotations.Schema;
using SmartCity.Shared;
using Volo.Abp.Domain.Entities;

namespace CommonManagement
{
    /// <summary>
    /// 获取积分消息类
    /// </summary>
    public class Notice : BasicAggregateRoot<int>
    {
        /// <summary>用户编号</summary>
        public int UserId { get; protected set; }

        /// <summary>事件</summary>
        public ScoreEvent Event { get; protected set; }

        /// <summary>积分变更</summary>
        public int Score { get; protected set; }

        /// <summary>变更类型</summary>
        public ScoreChangeType Type { get; protected set; }

        /// <summary>变更日期</summary>
        public DateTime ChangeDate { get; protected set; }

        /// <summary>用户</summary>
        [ForeignKey("UserId")]
        public User User { get; protected set; }

        private Notice() { }
    }
}